/**
 *  EKology - An Ecosystem Simulation Framework
 *  Copyright (C) 2008  Aarón Tavío - aaron.tavio at gmail.com - ULPGC
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * 
 */

package net.ekology.ekosystem;

import net.ekology.core.datatypes.Automaton;
import java.util.Calendar;


/**
 * Every abiotic agent in the ecosystem must extend this class
 * <p>
 * An <code>AbioticAgent</code> can have an associated <code>Automaton</code> but
 * no genome. A XML codified genome is used to initialize the <code>Automaton</code>
 * 
 * @author Aarón Tavío - aaron.tavio at gmail.com
 * @version 1.0.0 - 20081019-1700
 */
public abstract class AbioticAgent extends Agent {
    private Automaton oAutomaton;
    

    
    public AbioticAgent() {
        super();
        oAutomaton = null;
    }
    
    public AbioticAgent(String sID, Biotope oBiotope) {
        super(sID,oBiotope);
        oAutomaton = null;
    }

    
    public AbioticAgent(String sID, Biotope oBitope, Automaton oAutomaton) {
        super(sID,oBitope);
        this.oAutomaton = oAutomaton;
    }
    
    
    public AbioticAgent(String sID, Biotope oBitope, Calendar oCreationDate, Automaton oAutomaton) {
        super(sID,oBitope,oCreationDate);
        this.oAutomaton = oAutomaton;
    }
    
    
    @Override
    public Automaton getAutomaton() {
        return oAutomaton;
    }
    
    
    public void setAutomaton(Automaton oAutomaton) {
        if (this.oAutomaton == null) this.oAutomaton = oAutomaton;
    }

}